---
id: 6577562501feabdf0984a184
title: Passo 14
challengeType: 20
dashedName: step-14
---

# --description--

After assigning the `left_part` index to the sorted array, increment `left_array_index` by `1`.

# --hints--

You should add `1` to the current value of `left_array_index`.

```js
({
  test: () => {
    const transformedCode = code.replace(/\r/g, "");
    const merge_sort = __helpers.python.getDef("\n" + transformedCode, "merge_sort");
    const { function_body } = merge_sort;

    const allowedMatches = [
      /while\s+left_array_index\s*<\s*len\(\s*left_part\s*\)\s+and\s+right_array_index\s*<\s*len\(\s*right_part\s*\):\s*[^}]*if\s+left_part\s*\[\s*left_array_index\s*\]\s*<\s*right_part\s*\[\s*right_array_index\s*\]\s*:\s*[^}]*left_array_index\s*\+=\s*1\s*(?!.*\bpass\b)/,
      /while\s+left_array_index\s*<\s*len\(\s*left_part\s*\)\s+and\s+right_array_index\s*<\s*len\(\s*right_part\s*\):\s*[^}]*if\s+left_part\s*\[\s*left_array_index\s*\]\s*<\s*right_part\s*\[\s*right_array_index\s*\]\s*:\s*[^}]*left_array_index\s*=\s*left_array_index\s*\+\s*1\s*(?!.*\bpass\b)/
    ]

    const anyMatch = allowedMatches.some((match) => match.test(function_body));
    assert.isTrue(anyMatch);
  }
})
```

# --seed--

## --seed-contents--

```py
def merge_sort(array):

    middle_point = len(array) // 2
    left_part = array[:middle_point]
    right_part = array[middle_point:]

    merge_sort(left_part)
    merge_sort(right_part)

    left_array_index = 0
    right_array_index = 0
    sorted_index = 0

    while left_array_index < len(left_part) and right_array_index < len(right_part):
--fcc-editable-region--
        if left_part[left_array_index] < right_part[right_array_index]:
            array[sorted_index] = left_part[left_array_index]

--fcc-editable-region--
```
